package com.micai.springboot.util.sms;

import com.micai.springboot.service.BaseConfig;
import com.micai.springboot.service.SmsService;
import com.micai.springboot.service.impl.DingDongCloudConfig;
import com.micai.springboot.service.impl.DingDongCloudSmsService;

/**
 * @Auther: zhaoxinguo
 * @Date: 2018/9/28 17:09
 * @Description: 验证码工具类
 */
public class VerificationUtil {

    /**
     * 创建叮咚云短信服务
     *
     * @return
     */
    public static SmsService createSmsService(BaseConfig config) {
        if (config instanceof DingDongCloudConfig)
            return new DingDongCloudSmsService((DingDongCloudConfig) config);
        //可扩展为其他短信运营上
        return null;
    }
}
